import instance from "@/util/request";

export function getShopCarList(page){
    console.log("data",page.value)
    return instance({
        url:'/cart/page',
        method:'GET',
        params:{
            page:page.value.pageNum,
            pageSize: page.value.pageSize
        }

    })
}
export function getCartByUid(uid:number){
	
	return instance({
	    url:'/cart/findAllByUid/'+uid,
	    method:'GET',
	})
}

export function addCart (data){
	return instance({
	method:'POST',
	url:'/cart/addProduct',
	data:data
	})
}
export function updateChoose (data){
	return instance({
	method:'PUT',
	url:'/cart//updateCartChoose',
	params:{
		cartChoose:data.cartChoose,
		cartUid: data.cartUid
	}
	})
}
export function del(cartId){
  
    return instance({
        url:'/cart/delByCartId',
        method:'DELETE',
        params:{
           cartId:cartId
        }

    })
}

